var express = require('express');
var router = express.Router();
var logger = require('../libs/log.js').logger;
var wx = require('../controller/wxController');


/* GET home page. */
router.use('/:dir/:class/:func', function(req, res, next) {
  logger.debug('URI /'+req.params.dir+'/'+req.params.class+'/'+req.params.func);


  //res.render('index', { title: 'Express' });
  switch (req.params.class){
    case 'wx' :
      wx[req.params.func](req,res,next);
          break;
    default:
      next();
  }

});

module.exports = router;
